<?php
include 'koneksi.php';

$id =$_POST['id'];
$name =$_POST['name'];
$jk =$_POST['jk'];
$noktp =$_POST['noktp'];
$tgllahir =$_POST['tgllahir'];
$alamat =$_POST['alamat'];
/*$kota =$_POST['kota'];*/
$telp =$_POST['telp'];
$role =$_POST['role'];
$email =$_POST['email'];
$password =$_POST['password'];
/*----------------seller only----------------*/
$idtoko =$_POST['idtoko'];
$toko =$_POST['toko'];
$alamattoko =$_POST['alamattoko'];

$query = "INSERT INTO user (ID_USER, ID_ROLE, NAMA, EMAIL, PASSWORD, ALAMAT, NOMOR_KTP, NOMOR_TELEPON, TANGGAL_LAHIR, JENIS_KELAMIN)
VALUES ('$id','$role','$name','$email','$password','$alamat','$noktp','$telp','$tgllahir','$jk')";

$query1 = "INSERT INTO toko (KODE_TOKO, NAMA_TOKO, ALAMAT_TOKO)
VALUES ('$idtoko','$toko','$alamattoko')";

if (!mysql_query($query,$con))
  {
  die('error: ' . mysql_error());
  }

include "login.php";
echo "Selamat anda telah terdaftar!"
?>